package com.mysoft.gfyx.marketdevelop.controller.tag;

import com.mysoft.framework.modeling.OptionDataController;
import com.mysoft.framework.modeling.dto.Filter;
import com.mysoft.framework.modeling.dto.OptionItem;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.marketdevelop.service.CompanyService;
import com.mysoft.gfyx.marketdevelop.service.DeveloperService;
import com.mysoft.gfyx.marketdevelop.service.LabelService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Tag(name = "公司类型标签备选项-API")
@PubService(value = "/companyTypeOptionData", prefix = RequestPrefix.API, method = {})
public class CompanyTypeOptionDataController extends OptionDataController {
    @Resource
    private LabelService labelService;

    @Override
    protected List<OptionItem> load(List<Filter> filters, Map<String, String> urlParams) {
        List<OptionItem> result = new ArrayList<>();
        OptionItem item = new OptionItem();
        item.setValue("央企控股");
        item.setText("央企控股");
        result.add(item);
        OptionItem item1 = new OptionItem();
        item1.setValue("国有控股");
        item1.setText("国有控股");
        result.add(item1);
        OptionItem item2 = new OptionItem();
        item2.setValue("民企");
        item2.setText("民企");
        result.add(item2);
        OptionItem item3 = new OptionItem();
        item3.setValue("集体所有制");
        item3.setText("集体所有制");
        result.add(item3);
        OptionItem item4 = new OptionItem();
        item4.setValue("个体户");
        item4.setText("个体户");
        result.add(item4);
        OptionItem item5 = new OptionItem();
        item5.setValue("合资");
        item5.setText("合资");
        result.add(item5);
        OptionItem item6 = new OptionItem();
        item6.setValue("外资");
        item6.setText("外资");
        result.add(item6);
        OptionItem item7 = new OptionItem();
        item7.setValue("事业单位");
        item7.setText("事业单位");
        result.add(item7);
        OptionItem item8 = new OptionItem();
        item8.setValue("其他");
        item8.setText("其他");
        result.add(item8);
        OptionItem item9 = new OptionItem();
        item9.setValue("港澳台");
        item9.setText("港澳台");
        result.add(item9);

        return result;
        //return labelService.loadValueTo0ValueTagsByTagName(DeveloperService.TjEntity.Developer, LabelService.LABEL_COMPANY_TYPE);
    }
}
